home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr28 / lanscrpt.zip / SYSTEM.BAT < prev   
DOS Batch File  |  1993-03-24  |  2KB  |  60 lines

  1. @echo off
  2. rem Another enviroment variable to find the machine name that the user is 
  3. rem logging in from.  I use the /noerror so that the machine won't start 
  4. rem beeping if something goes wrong.  
  5. set mach_name=xxxxxxx
  6. net/noerror string mach_name !"machineid"
  7. net/noerror use y: \\server1\lanutil
  8. net/noerror message/disable beep
  9. net/noerror clock \\server1
  10. net/noerror lpt timeout 10
  11. net/noerror lpt notify /enable
  12. net/noerror stream/enable \\server1 0 @deskjet
  13. net/noerror stream/enable \\server1 1 @draft
  14. net/noerror stream/enable \\server1 2 @envelop
  15. net/noerror stream/enable \\server1 3 @???????.???
  16. rem Now we bring it all together.  Below, you use the %name% variable to run a
  17. rem specific batch file that matches the users name.  
  18. if %mach_name%==server1 goto server
  19. if %mach_name%==front1 goto work1
  20. if %mach_name%==8088 goto work2
  21.  
  22. :server
  23. if %name%==ken .and. %mach_name%==server1 call z:\%name%
  24. if %name%==betty .and. %mach_name%==server1 call z:\%name%
  25. if %name%==vikki .and. %mach_name%==server1 call z:\%name%
  26. if not %name%==ken .or. %name%==vikki .or. %name%==betty .and. %mach_name%==server1 goto 2nd
  27. goto end
  28.  
  29. :work1
  30. if %name%==ken .and. %mach_name%==front1 call z:\%name%
  31. if %name%==betty .and. %mach_name%==front1 call z:\%name%
  32. if %name%==vikki .and. %mach_name%==front1 call z:\%name%
  33. goto 1st
  34.  
  35. :work2
  36. if %name%==ken .and. %mach_name%==8088 call z:\%name%
  37. if %name%==betty .and. %mach_name%==8088 call z:\%name%
  38. if %name%==vikki .and. %mach_name%==8088 call z:\%name%
  39. if not %name%==ken .or. %name%==betty .or. %name%==vikki .and. %mach_name%==8088 goto 2nd
  40.  
  41. :1st
  42. m:
  43. call m:\qnet %name%
  44. goto end
  45.  
  46. :2nd
  47. call z:\%name%
  48. i:
  49. call i:\menu
  50. goto end
  51.  
  52. :other
  53. goto end
  54.  
  55. :end
  56. cls
  57. set path=c:\dos;c:\4dos;c:\lantasti;c:\utility
  58. quit
  59.  
  60.